// 截取字符串的首尾空白符
String.prototype.trim = function()
{
  return this.replace(/(^\s*)|(\s*$)/g, "");
}

// 数组去重
Array.prototype.unique = function(){
  let res = []
  let json = {}
  for(let i = 0; i < this.length; i++){
    if(!json[this[i]]){
      res.push(this[i])
      json[this[i]] = 1
    }
  }
  return res
}
